﻿package net.cooltain.warhammer.framework.constant;

import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;

public class ConstantPhases  extends Constants{
	
	public static Integer BEGENING_OF_TURN   = 0;
	public static Integer KINGDOM_PHASES     = 10;
	public static Integer QUEST_PHASES       = 20;
	public static Integer CAPITAL_PHASES     = 30;
	public static Integer BATTLEFIELD_PHASES = 40;
	public static Integer END_OF_TURN_PHASES = 50;
	
	public static String BEGENING_OF_TURN_CN   = "回合开始";
	public static String KINGDOM_PHASES_CN     = "王国阶段";
	public static String QUEST_PHASES_CN       = "任务阶段";
	public static String CAPITAL_PHASES_CN     = "首都阶段";
	public static String BATTLEFIELD_PHASES_CN = "战场阶段";
	public static String END_OF_TURN_PHASES_CN = "回合结束";
	
	public static Integer BATTLE1_CHOOSE_AREA   = 41;
	public static Integer BATTLE2_CHOOSE_ATTACK = 42;
	public static Integer BATTLE3_CHOOSE_DEFEND = 43;
	public static Integer BATTLE4_ATTACK_DAMEGE = 44;
	public static Integer BATTLE5_DEFEND_DAMEGE = 45;
	public static Integer BATTLE6_CALC_DAMEGE   = 46;
	
	public static String BATTLE1_CHOOSE_AREA_CN   = "选择进攻区域";
	public static String BATTLE2_CHOOSE_ATTACK_CN = "宣告攻方部队";
	public static String BATTLE3_CHOOSE_DEFEND_CN = "宣告守方部队";
	public static String BATTLE4_ATTACK_DAMEGE_CN = "攻方分配伤害";
	public static String BATTLE5_DEFEND_DAMEGE_CN = "守方分配伤害";
	public static String BATTLE6_CALC_DAMEGE_CN   = "双方伤害处理";

	public static Map<Integer,String> allPhases = new LinkedHashMap<Integer, String>(12);
	static{
		allPhases.put(BEGENING_OF_TURN     , BEGENING_OF_TURN_CN);
		allPhases.put(KINGDOM_PHASES       , KINGDOM_PHASES_CN);
		allPhases.put(QUEST_PHASES         , QUEST_PHASES_CN);
		allPhases.put(CAPITAL_PHASES       , CAPITAL_PHASES_CN);
		allPhases.put(BATTLEFIELD_PHASES   , BATTLEFIELD_PHASES_CN);
		allPhases.put(BATTLE1_CHOOSE_AREA  , BATTLE1_CHOOSE_AREA_CN);
		allPhases.put(BATTLE2_CHOOSE_ATTACK, BATTLE2_CHOOSE_ATTACK_CN);
		allPhases.put(BATTLE3_CHOOSE_DEFEND, BATTLE3_CHOOSE_DEFEND_CN);
		allPhases.put(BATTLE4_ATTACK_DAMEGE, BATTLE4_ATTACK_DAMEGE_CN);
		allPhases.put(BATTLE5_DEFEND_DAMEGE, BATTLE5_DEFEND_DAMEGE_CN);
		allPhases.put(BATTLE6_CALC_DAMEGE  , BATTLE6_CALC_DAMEGE_CN);
		allPhases.put(END_OF_TURN_PHASES   , END_OF_TURN_PHASES_CN);
	}
	
	/**
	 * 初始化: 允许打出设施卡的回合
	 * @return
	 */
	public static Map<Integer,Boolean> initAllowDeveloperPhases(){
		Map<Integer,Boolean> allowMap = new HashMap<Integer, Boolean>();
		allowMap.put(BEGENING_OF_TURN, false);
		allowMap.put(KINGDOM_PHASES  , false);
		allowMap.put(QUEST_PHASES    , false);
		allowMap.put(CAPITAL_PHASES  , true);
		allowMap.put(BATTLEFIELD_PHASES, false);
		allowMap.put(END_OF_TURN_PHASES, false);
		return allowMap;
	}
}
